(function( $ ) { 'use strict'; jQuery( document ).ready( function(){ // click the next button in step view jQuery('.next_row').click(function(){ jQuery(this).closest('.pro_rate_cal_step_main').hide(); jQuery(this).closest('.pro_rate_cal_step_main').next().show(); jQuery(this).closest('.pro_rate_cal_step_main').next().find('tbody').find('.notice').remove(); var index = 0; var count_tr = jQuery(this).closest('.pro_rate_cal_step_main').next().find('tbody tr').length jQuery(this).closest('.pro_rate_cal_step_main').next().find('tbody tr').each(function(){ if( jQuery(this).is(":visible") == false){ index++; } }); var catename = jQuery(this).closest('.pro_rate_cal_step_main').next().find('.cate_name').val(); if(catename){ var event = "next"; tabviewactive(catename,event); } }) // click the previous button in step view jQuery('.previous_row').click(function(){ jQuery(this).closest('.pro_rate_cal_step_main').hide(); jQuery(this).closest('.pro_rate_cal_step_main').prev().show(); jQuery(this).closest('.pro_rate_cal_step_main').prev().find('tbody').find('.notice').remove(); var index = 0; var count_tr = jQuery(this).closest('.pro_rate_cal_step_main').prev().find('tbody tr').length jQuery(this).closest('.pro_rate_cal_step_main').prev().find('tbody tr').each(function(){ if( jQuery(this).is(":visible") == false){ index++; } }); var catename = jQuery(this).closest('.pro_rate_cal_step_main').prev().find('.cate_name').val(); if(catename){ var event = "prev"; tabviewactive(catename,event); } }) // sticky form show time out js setTimeout(function(){ jQuery('.sticky_form').addClass('active'); if(jQuery('.sticky_form').hasClass('active')){ jQuery('body').addClass('pro_rate_overflow_hide'); } jQuery('.pro_cale_sticky_form_overly').addClass('active'); }, ProRateCalFormtimeout * 1000 ); // step view in button click hide the category slider jQuery('.view_pricing_row ').click(function(){ jQuery('.pro_rate_cal_step_submit_btn_block .rate_cal_button').trigger('click'); jQuery('.pro_step_tabs_section').hide() }); // show category slider jQuery('.rate_cal_let_me_rate_cal ').click(function(){ jQuery('.pro_rate_cal_step_submit_btn_block .rate_cal_button').trigger('click'); jQuery('.pro_step_tabs_section').show() }); // tab view js added $(".pro_rate_tab_content").hide(); $(".pro_rate_tab_content:first").show(); jQuery('.tab_view_tigger_event').trigger("click"); jQuery('.pro_rate_cale_tab_view select').on("keyup keypress click",function(){ jQuery(this).parents("form").trigger("submit"); }); jQuery('.pro_rate_cale_tab_view input').on("keyup keypress change click",function(){ jQuery(this).parents("form").trigger("submit"); }); /* if in tab mode */ $(".pro_rate_tabs li").click(function() { jQuery('.tab_view_tigger_event').trigger("click"); $(".pro_rate_tab_content").hide(); var activeTab = $(this).attr("rel"); $("#"+activeTab).fadeIn(); $(".pro_rate_tabs li").removeClass("pro_rate_tab_active"); $(this).addClass("pro_rate_tab_active"); $(".pro_rate_tab_drawer_heading ").removeClass("pro_rate_tab_d_active "); $(".pro_rate_tab_drawer_heading[rel^='"+activeTab+"']").addClass("pro_rate_tab_d_active "); }); /* if in drawer mode */ $(".pro_rate_tab_drawer_heading").click(function() { jQuery('.tab_view_tigger_event').trigger("click"); $(".pro_rate_tab_content").hide(); var d_activeTab = $(this).attr("rel"); $("#"+d_activeTab).fadeIn(); $(".pro_rate_tab_drawer_heading").removeClass("pro_rate_tab_d_active"); $(this).addClass("pro_rate_tab_d_active"); $(".pro_rate_tabs li").removeClass("pro_rate_tab_active"); $(".pro_rate_tabs li[rel^='"+d_activeTab+"']").addClass("pro_rate_tab_active"); }); // tab view js // Custom select Start $('.fancy-layout select').each(function(){ var $this = $(this), numberOfOptions = $(this).children('option').length; $this.addClass('select-hidden'); $this.wrap('
'); $this.after('
'); var $styledSelect = $this.next('div.pro_rate_cal_field_custom_select_styled'); $styledSelect.text($this.children('option').eq(0).text()); var $list = $('